﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Geral.Master" Inherits="System.Web.Mvc.ViewPage<IList<SiteAgle.Models.Comentarios>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Projeto 
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
		<h1>Gestor Agile - Comentário (Lista)</h1>
  <div class="botoes">
			<a href="/comentarios/novo/<%:ViewData["idTarefa"] %>" title="Adicionar Novo">
				<div class="botoesBox">
					<span class="novo"></span>
				</div>
			</a> 
		</div>

		<div id="content">
				<table class="table">
					<thead>
						<tr>
							<th>Código</th>
                            <th>Comentário</th>
							<th>Resposável</th>
							
							<td style="width:90px"></td>
						</tr>
					</thead>

					<tbody>
                      <% foreach (SiteAgle.Models.Comentarios item in Model)
                         { %>
						<tr>
							<td><%:item.Id %></td>
							<td><%:item.Comentario %></td>
						
                            <td><%:item.Usuario.Nome %></td>                        					
							<td>
                            <%if(item.Usuario.Id == SiteAgle.ViewHelper.UserHelper.user.Id){ %>
                                <a href="/comentarios/excluir/<%= item.Id %>" title="Excluir" class="remove-list-cadastro"><span class="list-remover"></span></a>
                   				<a href="/comentarios/editar/<%=item.Id %>" title="Editar"><span class="list-editar"></span></a>
                                <% }else
                                {%>
                                <a href="/comentario/detalhe/<%=item.Id %>"  title="Visualizar"><span class="list-arquivar"></span></a>
                                
                                
                                
                                <% }%>
							</td>
						</tr>
                        <%} %>
					</tbody>
				</table>
		</div><!-- CONTENT -->

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentHead" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="ContentFooter" runat="server">
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="ContentScripts" runat="server">
</asp:Content>
